Create database MAIL
go
Use [MAIL]
go
Create table TREAT_AS
(
MaTreatAs int identity (1,1),
TreatAsName varchar (100),
Deleted bit,

CONSTRAINT PK_TREATAS primary key (MaTreatAs),

)
go
Create table MAIL_SERVER
(
MaMailServer int identity (1,1),
MaTreatAs int,
DomainName varchar (100),
MailServer varchar (100),
UserName char (100),
Password char (100),
Port int,
SecuredAuthentication int,
Deleted bit,

CONSTRAINT PK_MAILSERVER primary key (MaMailServer),
CONSTRAINT FK_MAILSERVER_TREATAS foreign key (MaTreatAs) REFERENCES TREAT_AS (MaTreatAs),

)
go
